home *** CD-ROM | disk | FTP | other *** search
- //***********************************************************************
- //
- // Threads.h
- //
- //***********************************************************************
-
- class CMyApp : public CWinApp
- {
- public:
- virtual BOOL InitInstance ();
- };
-
- class CMainWindow : public CFrameWnd
- {
- private:
- CWinThread* m_pThread[4];
- BOOL m_bContinue[4];
- BOOL m_bFriendlyThreads;
-
- void DrawHand (CDC*, int, int, int, COLORREF);
- static UINT ThreadFunc (LPVOID);
-
- public:
- CMainWindow ();
-
- protected:
- virtual BOOL PreCreateWindow (CREATESTRUCT&);
-
- afx_msg void OnClose ();
- afx_msg void OnToggleThread (UINT);
- afx_msg void OnFriendlyThreads ();
- afx_msg void OnUpdateThreadUI (CCmdUI*);
- afx_msg void OnUpdateFriendlyThreadsUI (CCmdUI*);
- afx_msg void OnExit ();
-
- DECLARE_MESSAGE_MAP ()
- };
-
- typedef struct tagTHREADPARMS {
- CPoint point;
- BOOL* pContFlag;
- BOOL* pFriendFlag;
- LPARAM lParam;
- } THREADPARMS;
-